﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="UserList.aspx.cs" Inherits="MedicalCare.Admin.UserList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:HiddenField ID="hideOrderby" runat="server" />
    
 <asp:DataList ID="UsersList" runat="server" CellPadding="2" 
        onitemcommand="UsersList_ItemCommand">
                    <%--<AlternatingItemStyle BackColor="White" ForeColor="#284775" />--%>
                    <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <%--<ItemStyle BackColor="#F7F6F3" ForeColor="#333333" />--%>
                    <HeaderTemplate>
                        <table cellpadding="2" cellspacing="0" border="0">
                            <tr>
                                <td style="width: 80px;display:none">
                                   UserId
                                </td>
                                 <td style="width: 80px; text-align: center">
                                    用户姓名
                                </td>
                                <td style="width: 80px; text-align: center">
                                    用户角色
                                </td>
                                <td style="width: 80px; text-align: center">
                                    身份证
                                </td>
                                <td style="width: 80px; text-align: center">
                                    性别
                                </td>
                                <td style="width: 80px; text-align: center">
                                    移动电话
                                </td>
                                <td style="width: 80px; text-align: center">
                                    Email
                                </td>
                                <td style="width: 80px; text-align: center">
                                    QQ号码
                                </td>
                                <td style="width: 80px; text-align: center">
                                    备注
                                </td>
                                <td style="width: 80px; text-align: center">
                                    状态
                                </td>
                                <td style="width: 150px; text-align: center">
                                    操作
                                </td>
                            </tr>
                        </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <table cellpadding="2" cellspacing="0" border="0">
                            <tr onmouseover="this.style.background ='#FFDEAD';" onmouseout="this.style.background ='#ffffff'">
                                <td style="width: 80px;display:none">
                                       <%# DataBinder.Eval(Container.DataItem, "Id")%>
                                </td>
                                <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "Name")%>
                                </td>
                                <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "RoleName")%>
                                </td>
                                  <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "IDNumber")%>
                                </td>
                                <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "Gender")%>
                                </td>
                                <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "Mobile")%>
                                </td>
                                <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "Email")%>
                                </td>
                                <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "QQ")%>
                                </td>
                                <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "Comment")%>
                                </td>
                                <td style="width: 80px; text-align: center">
                                    <%# DataBinder.Eval(Container.DataItem, "Valid")%>
                                </td>
                                <td style="width: 150px; text-align: center">
                                   <asp:Button ID="btEdit" runat="server"  CommandName="edit" Text="编辑"  CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id")%>' />
                                   <asp:Button ID="btDelete" runat="server"  CommandName="del" Text="删除" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "Id")%>' />
                                </td>
                            </tr>
                        </table>
                    </ItemTemplate>
                    <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                </asp:DataList>
<div>
        <webdiyer:AspNetPager ID="userListPager" runat="server" HorizontalAlign="left" 
    CssClass="paginator"   CurrentPageButtonClass="cpb"
        PrevPageText="上一页" NextPageText="下一页" NumericButtonTextFormatString=" {0} "
    ShowBoxThreshold="2" PageSize="5" InputBoxClass="text2" TextAfterInputBox=""
    PagingButtonStyle="" OnPageChanging="msgPager_PageChanging" 
    ShowPageIndexBox="Always" SubmitButtonText="确定"
    TextAfterPageIndexBox="页" TextBeforePageIndexBox="跳转至" 
    CurrentPageButtonPosition="Center" ShowFirstLast="False" />
</div>
<%--Champion 2013/1/3--%>
<asp:Button ID="btnAdd" runat="server" Text="添加新用户" onclick="btnAdd_Click" />

</asp:Content>
